package com.parenting.feigncontroller;

import cn.hutool.core.bean.BeanUtil;
import com.parenting.entities.ActivityDO;
import com.parenting.feign.controller.IFeignAppletActivityController;
import com.parenting.model.ActivityDTO;
import com.parenting.service.ActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FeignAppletActivityController implements IFeignAppletActivityController {
    @Autowired
    private ActivityService activityService;

    @Override
    public ActivityDTO getActivityById(String activityId) {
        ActivityDO byId = activityService.getById(activityId);
        return BeanUtil.copyProperties(byId,ActivityDTO.class);
    }
}
